import { request } from "@/utils/service"

/**
 * @param params 添加思维导图
 * @returns
 */
export const APIXmindAdd = (data: { messages: string; scene: string; model: string }) => {
  return request<any>({
    url: "/xmind/add",
    method: "POST",
    data
  })
}
/**
 * @param params 保存思维导图
 * @returns
 */
export const APIXmindSet = (data: { xmind_id: string; content: string }) => {
  return request<any>({
    url: "/xmind/set",
    method: "post",
    data
  })
}

/**
 * @param  思维导图列表
 * @returns
 */
export const APIXmindList = (page: number = 1) => {
  return request<any>({
    url: "/xmind/list",
    method: "post",
    data: { page }
  })
}

/**
 * @param  获取思维导图
 * @returns
 */
export const APIXmindGet = (xmind_id: number) => {
  return request<any>({
    url: "/xmind/get",
    method: "post",
    data: { xmind_id }
  })
}

/**
 * @param  获取思维导图
 * @returns
 */
export const APIXmindDel = (xmind_id: number) => {
  return request<any>({
    url: "/xmind/del",
    method: "post",
    data: { xmind_id }
  })
}
